module.exports = {
  devServer: {
    proxy: {
      '/foo': {
        target: 'http://localhost:8999',
        changeOrigin: true,
        pathRewrite: {
          '^/foo': '/' // 将 /foo/home/banner 映射为 /home/banner
        }
      },
      '/user': {
        target: 'http://localhost:8999',
        changeOrigin: true,
        pathRewrite: {
          '^/user': '/'
        }
      }
    }
  }
};